//
//  CHSUIViewController.m
//  ZXCategories_Example
//
//  Created by zhuxm2023 on 2024/8/1.
//  Copyright © 2024 海参. All rights reserved.
//

#import "CHSUIViewController.h"
#import <Masonry/Masonry.h>
#import <ZXCategoriesUtil/ZXCategoriesUtil.h>

@interface CHSUIViewController ()

@property (nonatomic, strong) UIView *playerView;

@end

@implementation CHSUIViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self setUI];
}


- (void)setUI{
    self.view.backgroundColor = [UIColor whiteColor];
    self.navigationItem.title = self.navTitle;

    [self.view addSubview:self.playerView];
//    self.playerView.frame = CGRectMake(0, UIApplication.zx_safeAreaNavBarHeight, UIScreen.mainScreen.bounds.size.width, 150);
    CGFloat top = UIApplication.zx_safeAreaNavBarHeight;
    [self.playerView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(self.view.mas_left).offset(0);
        make.centerX.mas_equalTo(self.view.mas_centerX);
        make.top.mas_equalTo(self.view.mas_top).offset(top);
        make.height.mas_equalTo(150);

    }];
    
    //    NSLog(@"主线程的mainRunLoop%@",[NSRunLoop currentRunLoop]);
        
    //    CGSize pxSize =  UIScreen.physicalPixelsSize;
    //    CGSize size =  UIScreen.screenSize;
        CGFloat pixelAspectRatio = [[UIScreen mainScreen]currentMode].pixelAspectRatio;
        NSString *str = [[UIDevice currentDevice]zx_getDeviceName];
}

- (UIView *)playerView {
    if (!_playerView) {
        _playerView = [[UIView alloc]init];
        _playerView.backgroundColor = [UIColor lightGrayColor];
    }
    return _playerView;
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
